﻿using System.Collections.Generic;

namespace Comsenz.Services.Blocks.Configs
{
    /// <summary>
    /// 模块字段集
    /// </summary>
    /// <author>Chrion</author>
    public class BlockFields : Dictionary<string, BlockField>
    {
        /// <summary>
        /// 添加模块字段
        /// </summary>
        /// <param name="key">键</param>
        /// <param name="name">该字段的显示名称</param>
        /// <param name="formType">该字段的显示方式</param>
        /// <param name="dataType">该字段的数据展示</param>
        public void Add(string key, string name, FormType formType = FormType.text, DataType dataType = DataType.@string)
        {
            Add(key, new BlockField(name, formType, dataType));
        }
    }
}
